/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.edmo.fastener.domain;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 *
 * @author obelog
 */
@Entity
public class OrderItem implements Serializable {
    
    private static final long serialVersionUID = -1308795024262635690L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    @Column
    private String suk;
    @Column
    private String pcs;
    @Column
    private String material;
    @Column
    private String delivery;
    @Column
    private String supplierCode;
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "orderItem", nullable = false)
    private CustomerOrder customerOrder;

    public OrderItem() {
    }

    public OrderItem(Long id, String suk, String pcs, String material, String delivery, String supplierCode, CustomerOrder customerOrder) {
        this.id = id;
        this.suk = suk;
        this.pcs = pcs;
        this.material = material;
        this.delivery = delivery;
        this.supplierCode = supplierCode;
        this.customerOrder = customerOrder;
    }

    public String getSupplierCode() {
        return supplierCode;
    }

    public void setSupplierCode(String supplierCode) {
        this.supplierCode = supplierCode;
    }

    @Override
    public String toString() {
        return suk + "|" + pcs + "|" + material + "|" + delivery;
    }

    public String getSuk() {
        return suk;
    }

    public void setSuk(String suk) {
        this.suk = suk;
    }

    public String getPcs() {
        return pcs;
    }

    public void setPcs(String pcs) {
        this.pcs = pcs;
    }

    public String getMaterial() {
        return material;
    }

    public void setMaterial(String material) {
        this.material = material;
    }

    public String getDelivery() {
        return delivery;
    }

    public void setDelivery(String delivery) {
        this.delivery = delivery;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public CustomerOrder getCustomerOrder() {
        return customerOrder;
    }

    public void setCustomerOrder(CustomerOrder customerOrder) {
        this.customerOrder = customerOrder;
    }

       
    
}
